/**
 * 
 */
package hu.gbalage.owlforms.internal.derived;

import java.net.URI;

import hu.gbalage.owlforms.api.Field;
import hu.gbalage.owlforms.api.data.FormData;

/**
 * @author balage
 *
 */
public class AllDerivedCalculator implements IDerivedCalculator {

	public static final URI egyforeesojovedelem = URI.create("http://owlforms.gbalage.hu/example/egyforeesojovedelem.owl#EgyForeEsoJovedelem");
	
	public static final URI eltartottak = URI.create("http://owlforms.gbalage.hu/example/eltartottak.owl#EgyHaztartasbanElok");
	
	public static final URI szoctam = URI.create("http://owlforms.gbalage.hu/example/szoctam_hallgato.owl#SzoctamHallgato");
	
	/* (non-Javadoc)
	 * @see hu.gbalage.owlforms.internal.derived.IDerivedCalculator#calculate(hu.gbalage.owlforms.api.data.FormData, hu.gbalage.owlforms.api.Field)
	 */
	public String calculate(FormData on, Field field) {
		
		if (on.getForm().getURI().equals(egyforeesojovedelem)){
			return new EgyForeEsoJovedelemCalc().calculate(on, field);
		}
		
		if (on.getForm().getURI().equals(eltartottak))
			return new EltartottakCalc().calculate(on, field);
		
		if (on.getForm().getURI().equals(szoctam))
			return new SzoctamCalc().calculate(on, field);
		
		return null;
	}

}
